/**************************************************************************/
/*                                                                        */
/* Copyright (c) Sinoembed Technology Co.,Ltd.           */
/*  */
/*                                                                        */
/*                                                                        */
/*    created:    2012-6-27                                             */ 
/*    filename:   CSinoembedPuzzleWnd.h                                          */ 
/*    author:     Derek Huang                                                  */  
/*    purpose:                                                            */ 
/*                                                                        */
/* ************************************************************************/

#ifndef __CE_NAVIPATH_WND_H__
#define __CE_NAVIPATH_WND_H__
#include <mzfc_inc.h>
//#include "iUiButton.h"
#include "TBInvokeInterface.h"
#include "UiNaviPathTopBar.h"
#include "UiNaviPathSwitch.h"
#include "UiNaviPathChoice.h"
#include "ExeManagerFileItem.h"

typedef enum _tagNaviPathWndDisplay
{
	NAVIPATH_TOPBAR_WND = 0,
	NAVIPATH_SWITCH_WND,
	NAVIPATH_CHOICE_WND,
	MAX_NAVIPATH_WND,
} NAVIPATH_WND;

class CNaviPathWnd : public CMzWndEx
{
public:
	CNaviPathWnd();
	virtual ~CNaviPathWnd();
	virtual void PaintWin(HDC hdc, RECT* prcUpdate /* = NULL */);
	virtual BOOL OnInitDialog();
	virtual  void OnMzCommand(WPARAM wParam, LPARAM lParam);
	virtual LRESULT MzDefWndProc(UINT message, WPARAM wParam, LPARAM lParam);
	virtual void OnLButtonDown(UINT fwKeys, int xPos, int yPos);
	virtual void DeleteImages();
	void DestroyWindow();
private:

public:
	void OnExit();
	void OnMenu();
	BOOL InitBackgrandImages();
	void LoadiInterItem();
//	static void APP_MPEG_CbkFunc(PROTOCAL_INFO, BYTE);
#ifdef MERGER_APP_TO_SHELL
	BOOL Create();
#endif

public:
	HDC				m_hBakDC;
	ImagingHelper	*m_NaviPathWndBG;
	ImagingHelper	*m_ChoiceWndBG;
	HBITMAP			m_hBitmapBakDC;
public:
	UiWin					m_uiWin;
	UiNaviPathTopBar		m_uiTopBar;
	UiNaviPathSwitchWnd		m_uiSwitch;
	UiNaviPathChioce		m_uiChoiceWnd;
private:
	CRITICAL_SECTION m_Lock;
public:
	inline void Lock(BOOL bLock){bLock ? EnterCriticalSection(&m_Lock):LeaveCriticalSection(&m_Lock);};
	std::vector<wstring> mfilters;
	UINT InitBrowserDir(CMzString &strPath, CExeManagerFileItem &managerFileItem, int nPos = -1);
	void DestroyBrowserList();
	void CreateBrowserList();
	void CreateBrowserList(TCHAR *pList);
	UINT DeleteBrowserDir(UINT nPos);
	UINT OpenDir(UINT nItem);
	UINT CloseDir(UINT nItem);
	CExeManagerFileItem		m_ManagerFileItem;
	
	BOOL ReloadBkgnd();
};


#endif
